package com.atguigu.gulimall.cart.service;

import com.atguigu.gulimall.cart.vo.Cart;
import com.atguigu.gulimall.cart.vo.CartItem;
import java.math.BigDecimal;
import java.util.List;
import java.util.concurrent.ExecutionException;

public interface CartService {

    Cart getCart()  throws ExecutionException, InterruptedException;

    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    CartItem getCartItem(long parseLong);

    void checkItem(Long skuId, Integer check);

    /*
     * @author zhouheng
     * 删除购物车商品信息
     * @date 2022/3/12 0012 22:39
     * @param null
     * @return null
     */
    void deleteItem(Long skuId);

    /*
     * @author zhouheng
     * 在购物车中添加商品数量
     * @date 2022/3/12 0012 22:41
     * @param null
     * @return null
     */
    void changeItemCount(Long skuId, Integer num);


    /**
     * 清空购物车
     */
    void clearCart(String cartKey);

    BigDecimal toTrade() throws ExecutionException, InterruptedException;

    List<CartItem> getUserCartItems();
}
